var express = require('express');
var router = express.Router();
const { BOMModels } = require('../model/wl_model')

router.get("/list",async (req,res)=>{
    let data = await BOMModels.find()
})


router.post("/add",async (req,res)=>{
    let data = req.body
    console.log(data);
    await BOMModels.create(data)
    res.send({
        code:200,
        msg:"添加物料成功"
    })
})
module.exports = router;
